#include "common.h"

struct timeval timeShow;

int64_t tUTCMSec()
{
    struct timeval start;

    gettimeofday(&start, NULL);

    return start.tv_sec * 1000L + start.tv_usec / 1000L;
}

int64_t tUTCUSec()
{
    struct timeval start;

    gettimeofday(&start, NULL);

    return start.tv_sec * 1000000L + start.tv_usec;
}

void DateDebug(char *str, uint8_t *buf, uint8_t len)
{
    LOG_WARN("%s", str);
    for (int i = 0;i < len;i++)
    {
        printf("%02d ", i);
    }
    printf("\r\n");
    for (int i = 0; i < len; i++)
    {
        printf("%02x ", buf[i]);
    }
    printf("\r\n");
}


